{% extends "data_list.html" %} {% load i18n %} {% block extracss %} {% endblock %} {% block content %}

{% trans '区域' %}

{% trans '显示全部人员' %}

 

{% endblock %} {% block getdatalist %} {% endblock %} {% block addjs %} var after_init=function(){ $('#id_area_select').parent(".div_box").hide(); } var after_close=function(){ $('#id_area_select').parent(".div_box").show(); } var after_submit=function(){ $('#id_area_select').parent(".div_box").show(); } $(function(){ $("#id_li_export").hide(); actions ={{specific_actions}} if (actions.OpAdjustArea){ actions = {"OpAdjustArea":actions.OpAdjustArea} $("#id_op_for_tab").append("
  • "+gettext("为区域添加人员")+"
  • "); } $("#id__OpAdjustArea").click(function(event){ var href = "{{dbapp_url}}personnel/Area/_op_/OpAdjustArea/"; $.zk._processEdit(href, $('#emp').get(0), undefined, event); return false; }) $('#emp').model_grid( { 'model_url':'{{dbapp_url}}personnel/Employee/', 'model_actions':false, 'object_actions':false, 'obj_edit':false, 'multiple_select':null, row_operations:false, disable_cols:["data_verbose_column","position.name",'Tele','Mobile','photo','id',"|thumbnail_url:'pin'|photo",'level_count','education'] }) $.ajax({ type: "POST", url:"../../data/personnel/Area/choice_data_widget?areatree=True", dataType:"html", success:function(json){ $("#id_area_select").hide().html(json).show(); $("#id_area_select").find("#id_personnel__Area").css({height:$(".dt_bdiv").height()+40, width:'100%'}); $("#id_area_select").find("#show_deptment").css({width:'98%'}); // $('#id_AreaSelect p').click(function(){ // var vItem = $(this).parent().attr("id") // $('#emp').get(0).g.base_query=["attarea__exact="+vItem] // $('#emp').get(0).g.load_data() // }) } }); $("#id_queryall").click(function(){ var strwhere=[]; $("#id_AreaSelect").find("p[class*='s']").attr("class","t"); $("#id_area_select").find("input[type='hidden']").attr("value",""); $('#emp').get(0).g.init_query=strwhere; $('#emp').get(0).g.base_query=strwhere; $('#emp').get(0).g.load_data(); }) }) function reflash_child_area_list(event, treeId, treeNode){ var parent_id = treeNode.id; var strwhere=[]; strwhere.push("attarea__id__exact="+parent_id); var $grid = $('#emp'); var datalist=$grid.get(0); datalist.g.init_query=strwhere; datalist.g.load_data(); } {% endblock %}